<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateRequirementTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateRequirementLabel_id}" for="id" />
                    <h:inputText id="id" value="#{requirementController.selected.id}" title="#{bundle.CreateRequirementTitle_id}" required="true" requiredMessage="#{bundle.CreateRequirementRequiredMessage_id}"/>
                    <h:outputLabel value="#{bundle.CreateRequirementLabel_date}" for="date" />
                    <h:inputText id="date" value="#{requirementController.selected.date}" title="#{bundle.CreateRequirementTitle_date}" required="true" requiredMessage="#{bundle.CreateRequirementRequiredMessage_date}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.CreateRequirementLabel_phoneNumber}" for="phoneNumber" />
                    <h:inputText id="phoneNumber" value="#{requirementController.selected.phoneNumber}" title="#{bundle.CreateRequirementTitle_phoneNumber}" required="true" requiredMessage="#{bundle.CreateRequirementRequiredMessage_phoneNumber}"/>
                    <h:outputLabel value="#{bundle.CreateRequirementLabel_latitude}" for="latitude" />
                    <h:inputText id="latitude" value="#{requirementController.selected.latitude}" title="#{bundle.CreateRequirementTitle_latitude}" required="true" requiredMessage="#{bundle.CreateRequirementRequiredMessage_latitude}"/>
                    <h:outputLabel value="#{bundle.CreateRequirementLabel_longitude}" for="longitude" />
                    <h:inputText id="longitude" value="#{requirementController.selected.longitude}" title="#{bundle.CreateRequirementTitle_longitude}" required="true" requiredMessage="#{bundle.CreateRequirementRequiredMessage_longitude}"/>
                    <h:outputLabel value="#{bundle.CreateRequirementLabel_place}" for="place" />
                    <h:inputText id="place" value="#{requirementController.selected.place}" title="#{bundle.CreateRequirementTitle_place}" />
                    <h:outputLabel value="#{bundle.CreateRequirementLabel_type}" for="type" />
                    <h:inputText id="type" value="#{requirementController.selected.type}" title="#{bundle.CreateRequirementTitle_type}" required="true" requiredMessage="#{bundle.CreateRequirementRequiredMessage_type}"/>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{requirementController.create}" value="#{bundle.CreateRequirementSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{requirementController.prepareList}" value="#{bundle.CreateRequirementShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.CreateRequirementIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
